package com.vipbbo.spring.applicationcontext;

import com.vipbbo.spring.bean.User;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;

/**
 * @author bdZhiBoWang
 */
public class MyBeanFactoryPostProcessor implements BeanFactoryPostProcessor {
	@Override
	public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
		User user = (User) beanFactory.getBean("user");
		user.setName("后处理的名字");
		System.out.println("对容器进行后处理。。。。");
	}
}
